
package com.dhcc.bpm.modules.api.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.common.json.JSONObject;
import com.dhcc.bpm.modules.api.entity.ProductApi;
import com.dhcc.bpm.modules.api.vo.ProductApiVO;
import com.dhcc.bpm.modules.workflow.dto.ApiBO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;

import java.util.List;

/**
 * @ClassName IProductApiService
 * @Description 品 api 关联表  服务类
 * @Author daina
 * @Date 2020/2/25 15:22
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
public interface IProductApiService extends BaseService<ProductApi> {

	/**
	 * @Description 自定义分页
	 * @Author daina
	 * @Date 15:51 2020/2/25
	 * @param page
	 * @param productApi
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.api.vo.ProductApiVO>
	 **/
	IPage<ProductApiVO> selectProductApiPage(IPage<ProductApiVO> page, ProductApiVO productApi);
	/**
	 * @Description 查询关联api
	 * @Author daina
	 * @Date 15:51 2020/2/25
	 * @param product_id
	 * @return java.util.List<java.lang.String>
	 **/
	List<String> selectRelatedApi(Long product_id);
	/**
	 * @Description 更新
	 * @Author daina
	 * @Date 15:51 2020/2/25
	 * @param product_id
	 * @return boolean
	 **/
	boolean updateDeleteRelate(Long product_id);
	/**
	 * @Description 更新
	 * @Author daina
	 * @Date 15:51 2020/2/25
	 * @param productApi
	 * @return int
	 **/
	int updateStatus(ProductApi productApi);
	/**
	 * @Description 更新
	 * @Author daina
	 * @Date 15:51 2020/2/25
	 * @param productApi
	 * @return int
	 **/
	int updateAllStatus(ProductApi productApi);
	/**
	 * @Description 更新
	 * @Author daina
	 * @Date 15:51 2020/2/25
	 * @param product_id
	 * @return java.util.List<com.dhcc.bpm.modules.workflow.dto.ApiBO>
	 **/
	List<ApiBO> listRelatedApi(Long product_id);
	/**
	 * @Description 条件查询 opc_product_api
	 * @Author daina
	 * @Date 15:51 2020/2/25
	 * @param productApi
	 * @return java.util.List<com.dhcc.bpm.modules.api.entity.ProductApi>
	 **/

	List<ProductApi> listProductApi(ProductApi productApi);

	List<ProductApiVO> listApiRelate(ProductApiVO productApi);
	/**
	 * @Description 根据productID，查询opc_product_api关联的API
	 * @Author daina
	 * @Date 15:52 2020/2/25
	 * @param productId
	 * @return java.util.List<com.dhcc.bpm.modules.workflow.dto.ApiBO>
	 **/
	List<ApiBO> listRelatedApiDetail(Long productId);
	/**
	 * @Description 维护opc_product_api
	 * @Author daina
	 * @Date 15:52 2020/2/25
	 * @param reqJson
	 * @return org.springblade.core.tool.api.R
	 **/
	R maintainProductApi(JSONObject reqJson);
	/**
	 * @Description 更新status by product_id,api_id
	 * @Author daina
	 * @Date 15:52 2020/2/25
	 * @param productApi
	 * @return int
	 **/
	int updateApiStatus(ProductApi productApi);


	/**
	 * @Description 查询api
	 * @Author sjm
	 * @Date 15:55 2020/3/10 0010
	 * @param id
	 * @return java.util.List<com.dhcc.bpm.modules.api.entity.ProductApi>
	 **/
    List<ProductApi> productApiList(Long id);
	/**
	 * @Description 删除
	 * @Author daina
	 * @Date 15:04 2020/2/25
	 * @param productApi
	 * @return int
	 **/
	int delete(ProductApi productApi);
}
